﻿using System;
#region Using statements
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SmartFrequency.Utils;
#endregion

namespace SmartFrequency.GUI
{
    public partial class About : Form
    {
        #region Private variables
        private Language FromLanguage;
        private Settings PSettings;
        private Utilities PUtils = new Utilities();
        #endregion

        #region Form functions
        public About()
        {
            InitializeComponent();

            this.Text = PUtils.Version;
            PSettings = new Settings("settings.txt");
            PSettings.Load();

            switch (PSettings.GetMember("language"))
            {
                default:
                case "TR":
                case "tr":
                    FromLanguage = new Language(Language.Language_e.TR);
                    //label1.Left += 20;
                    break;
                case "ENG":
                case "eng":
                    FromLanguage = new Language(Language.Language_e.ENG);
                    break;
            }

            label2.Text = FromLanguage.FrmMsgToString(Language.FormMsg_e.FORM5_LABEL1);
            label3.Text = FromLanguage.FrmMsgToString(Language.FormMsg_e.FORM5_LABEL2);

            menuItem2.Text = FromLanguage.FrmMsgToString(Language.FormMsg_e.MENU7_TEXT);
        }

        private void menuItem2_Click(object sender, EventArgs e)
        {
            Dispose();
        }
        #endregion
    }
}